lkn_name = "刘克念"
lkn_id = "1"
lkn_role = "项目经理"
zjk_name = "张江坤"
zjk_id = "2"
zjk_role = "输入开发员"
wwz_name = "王文召"
wwz_id = "3"
wwz_role = "测试员"
yfx_name = "余福欣"
yfx_id = "4"
yfx_role = "菜单开发员"
zxk_name = "郑逍康"
zxk_id = "5"
zxk_role = "权限开发员"
zzn_name = "郑智楠"
zzn_id = "6"
zzn_role = "文档员"
xiaozu_id = "三组"


def A():
    global lkn_name,zjk_id,zjk_role,zjk_name,zjk_id,zjk_role,wwz_name,wwz_id,wwz_role,yfx_name,yfx_id,yfx_role,zxk_name,zxk_id,zxk_role,zzn_name,zzn_id,zzn_role
    lkn_name = input("请输入成员1姓名：")
    lkn_id = input("请输入成员1学号：")
    lkn_role = input("请输入成员1角色：")
    zjk_name = input("请输入成员2姓名：")
    zjk_id = input("请输入成员2学号：")
    zjk_role = input("请输入成员2角色：")
    wwz_name = input("请输入成员3姓名：")
    wwz_id = input("请输入成员3学号：")
    wwz_role = input("请输入成员3角色：")
    yfx_name = input("请输入成员4姓名：")
    yfx_id = input("请输入成员4学号：")
    yfx_role = input("请输入成员4角色：")
    zxk_name = input("请输入成员5姓名：")
    zxk_id = input("请输入成员5学号：")
    zxk_role = input("请输入成员5角色：")
    zzn_name = input("请输入成员6姓名：")
    zzn_id = input("请输入成员6学号：")
    zzn_role = input("请输入成员6角色：")
    print(f"{xiaozu_id}：学生信息已更新！")
    print(f"{xiaozu_id}：更新后的成员信息如下：")
    print(f"姓名：{lkn_name},学号：{lkn_id},角色：{lkn_role}\n姓名：{zjk_name},学号：{zjk_id},角色：{zjk_role}\n姓名：{wwz_name},学号：{wwz_id},角色：{wwz_role}\n姓名：{yfx_name},学号：{yfx_id},角色：{yfx_role}\n姓名：{zxk_name},学号：{zxk_id},角色：{zxk_role}\n姓名：{zzn_name},学号：{zzn_id},角色：{zzn_role}")

def B():
    name1 = input("请输入要查询的姓名：")
    if name1 != "刘克念" and name != "张江坤" and name != "王文召" and name != "余福欣"and name != "郑逍康" and name != "郑智楠":
        print(f"{xiaozu_id}： {name1} 无有效权限！")
    elif name1 == "刘克念":
        print(f"{xiaozu_id}: {name1} 有权限删除数据！")
    elif name1 == "张江坤":
        print(f"{xiaozu_id}: {name1} 有权限开发数据！")
    elif name1 == "王文召":
        print(f"{xiaozu_id}: {name1} 有权限测试数据！")
    elif name1 == "余福欣":
        print(f"{xiaozu_id}: {name1} 有权限设计菜单！")
    elif name1 == "郑逍康":
        print(f"{xiaozu_id}: {name1} 有权限删除数据！")
    elif name1 == "郑智楠":
        print(f"{xiaozu_id}: {name1} 有权限开发数据！")


def C():
    print(f"{xiaozu_id}：成员信息如下：")
    print(f"姓名：{lkn_name},学号：{lkn_id},角色：{lkn_role}\n姓名：{zjk_name},学号：{zjk_id},角色：{zjk_role}\n姓名：{wwz_name},学号：{wwz_id},角色：{wwz_role}\n姓名：{yfx_name},学号：{yfx_id},角色：{yfx_role}\n姓名：{zxk_name},学号：{zxk_id},角色：{zxk_role}\n姓名：{zzn_name},学号：{zzn_id},角色：{zzn_role}")

def D():
    name2 = input("请输入操作者姓名：")
    id2 = input("请输入操作者学号：")
    role2 = input("请输入操作者角色：")
    if role2 == "项目经理":
        name3 = input("请输入要删除的姓名:")
        global lkn_name, zjk_id, zjk_role, zjk_name, zjk_id, zjk_role, wwz_name, wwz_id, wwz_role, yfx_name, yfx_id, yfx_role, zxk_name, zxk_id, zxk_role, zzn_name, zzn_id, zzn_role
        if name3 == lkn_name:
            lkn_name = ""
            lkn_id = ""
            lkn_role = ""
        elif name3 == zjk_name:
            zjk_name = ""
            zjk_id = ""
            zjk_role = ""
        elif name3 == wwz_name:
            wwz_name = ""
            wwz_id = ""
            wwz_role = ""
        elif name3 == yfx_name:
            yfx_name = ""
            yfx_id = ""
            yfx_role = ""
        elif name3 == zxk_name:
            zxk_name = ""
            zxk_id = ""
            zxk_role = ""
        elif name3 == zzn_name:
            zzn_name = ""
            zzn_id = ""
            zzn_role = ""
        print(f"{xiaozu_id}: {name3} 的信息已删除！")
    else:
        print(f"{xiaozu_id}: 无权限删除其他成员信息！")


def E():
    print(f"{xiaozu_id}: 程序已退出！")
    exit()

while True:
    name = input(f"请输入正在操作的{xiaozu_id}的成员姓名：")
    if name != "刘克念" and name != "张江坤" and name != "王文召" and name != "余福欣"and name != "郑逍康" and name != "郑智楠":
        print(f"错误： {name} 不是{xiaozu_id}的成员!")
    else:
        i = int(input(f"请输入{xiaozu_id}的操作:（1_{xiaozu_id}_更新学生信息,2_{xiaozu_id}_查询学生信息,3_{xiaozu_id}_展示学生信息,4_{xiaozu_id}_删除学生信息,5_{xiaozu_id}_退出程序）："))
        match i:
            case 1:
                A()
            case 2:
                B()
            case 3:
                C()
            case 4:
                D()
            case 5:
                E()



